package com.example.wechat;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface MessageApi {
    @POST("messages/send")
    Call<Response<Message>> sendMessage(@Body Message message);

    @GET("messages/conversation/{conversationId}")
    Call<Response<List<Message>>> getMessages(
        @Path("conversationId") String conversationId,
        @Query("before") long before,
        @Query("limit") int limit
    );

    @POST("messages/upload")
    Call<Response<String>> uploadImage(@Body String base64Image);

    @GET("messages/unread")
    Call<Response<Integer>> getUnreadCount(@Query("conversationId") String conversationId);
} 